package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HospitalSubscribeGroupPurchaseOrderApplyForMapper;
import com.ruoyi.system.domain.HospitalSubscribeGroupPurchaseOrderApplyFor;
import com.ruoyi.system.service.IHospitalSubscribeGroupPurchaseOrderApplyForService;

/**
 * 团队订单申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-12
 */
@Service
public class HospitalSubscribeGroupPurchaseOrderApplyForServiceImpl implements IHospitalSubscribeGroupPurchaseOrderApplyForService 
{
    @Autowired
    private HospitalSubscribeGroupPurchaseOrderApplyForMapper hospitalSubscribeGroupPurchaseOrderApplyForMapper;

    /**
     * 查询团队订单申请
     * 
     * @param id 团队订单申请主键
     * @return 团队订单申请
     */
    @Override
    public HospitalSubscribeGroupPurchaseOrderApplyFor selectHospitalSubscribeGroupPurchaseOrderApplyForById(Long id)
    {
        return hospitalSubscribeGroupPurchaseOrderApplyForMapper.selectHospitalSubscribeGroupPurchaseOrderApplyForById(id);
    }

    /**
     * 查询团队订单申请列表
     * 
     * @param hospitalSubscribeGroupPurchaseOrderApplyFor 团队订单申请
     * @return 团队订单申请
     */
    @Override
    public List<HospitalSubscribeGroupPurchaseOrderApplyFor> selectHospitalSubscribeGroupPurchaseOrderApplyForList(HospitalSubscribeGroupPurchaseOrderApplyFor hospitalSubscribeGroupPurchaseOrderApplyFor)
    {
        return hospitalSubscribeGroupPurchaseOrderApplyForMapper.selectHospitalSubscribeGroupPurchaseOrderApplyForList(hospitalSubscribeGroupPurchaseOrderApplyFor);
    }

    /**
     * 新增团队订单申请
     * 
     * @param hospitalSubscribeGroupPurchaseOrderApplyFor 团队订单申请
     * @return 结果
     */
    @Override
    public int insertHospitalSubscribeGroupPurchaseOrderApplyFor(HospitalSubscribeGroupPurchaseOrderApplyFor hospitalSubscribeGroupPurchaseOrderApplyFor)
    {
        hospitalSubscribeGroupPurchaseOrderApplyFor.setCreateTime(DateUtils.getNowDate());
        return hospitalSubscribeGroupPurchaseOrderApplyForMapper.insertHospitalSubscribeGroupPurchaseOrderApplyFor(hospitalSubscribeGroupPurchaseOrderApplyFor);
    }

    /**
     * 修改团队订单申请
     * 
     * @param hospitalSubscribeGroupPurchaseOrderApplyFor 团队订单申请
     * @return 结果
     */
    @Override
    public int updateHospitalSubscribeGroupPurchaseOrderApplyFor(HospitalSubscribeGroupPurchaseOrderApplyFor hospitalSubscribeGroupPurchaseOrderApplyFor)
    {
        hospitalSubscribeGroupPurchaseOrderApplyFor.setUpdateTime(DateUtils.getNowDate());
        return hospitalSubscribeGroupPurchaseOrderApplyForMapper.updateHospitalSubscribeGroupPurchaseOrderApplyFor(hospitalSubscribeGroupPurchaseOrderApplyFor);
    }

    /**
     * 批量删除团队订单申请
     * 
     * @param ids 需要删除的团队订单申请主键
     * @return 结果
     */
    @Override
    public int deleteHospitalSubscribeGroupPurchaseOrderApplyForByIds(Long[] ids)
    {
        return hospitalSubscribeGroupPurchaseOrderApplyForMapper.deleteHospitalSubscribeGroupPurchaseOrderApplyForByIds(ids);
    }

    /**
     * 删除团队订单申请信息
     * 
     * @param id 团队订单申请主键
     * @return 结果
     */
    @Override
    public int deleteHospitalSubscribeGroupPurchaseOrderApplyForById(Long id)
    {
        return hospitalSubscribeGroupPurchaseOrderApplyForMapper.deleteHospitalSubscribeGroupPurchaseOrderApplyForById(id);
    }
}
